Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paste when using SHIFT+INS #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndersMad
Copy link

Paste keyboard shortcut std. is also SHIFT + INSERT - this however will always paste as plainText for the parseFromClipboard because of (CTRL + SHIFT + V). To avoid this I added that the CTRL key also needs to be held while SHIFT is to get a plain text paste.

Not tested on Mac but I assume that the CTRL is Cmd there.

@marijnh
Copy link
Member

marijnh commented Sep 28, 2020

view.ctrlKey isn't a thing that is defined, so that will always be false, and this just breaks plain text pasting.

I'm not interested in changing the way plain text paste is done. A solution that detects shift-insert and disables the plain-text paste behavior for that would be welcome.

@AndersMad
Copy link
Author

AndersMad commented Sep 28, 2020

I'm sry, I just assumed that it was there + all 3 ways worked when testing: CTRL + INS, CTRL + SHIFT + INS (as text) and SHIFT + INS (not as plain text after this) - and that's because that (Chrome) will only have text/plain clipboard data on CTRL + SHIFT + INS 🤦‍♂️ .. I'll get back to the CTRL key thing later then - in case the paste source comes from other source..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants